<template>
  <div class="automaticLabelingMgt">
    <div class="header-top">
      <div class="head-title" @click="gotoPage()">
        <div class="backIcon"><i class="el-icon-back"></i></div>自动打标签设置
      </div>
    </div>
    <ul class="table-list">
      <li :class="active==index?`active`:``"  v-for="(item,index) in tablist" @click="getActive(index)">{{item.label}}</li>
    </ul>
<!--    行为标签-->
    <activelabel v-if="active==0"></activelabel>
<!--    生命周期-->
    <lifeCycleLabel v-if="active==1"></lifeCycleLabel>
<!--    客户价值标签-->
   <customerValueLabel v-if="active==2"></customerValueLabel>
    <!--    时间进程标签-->
    <timeCourse v-if="active==3"></timeCourse>
  </div>
</template>

<script>

export default {
  name: 'automaticLabelingMgt',
  components: {
    'activelabel': () => import('./components/activelabel.vue'),//行为标签
    'lifeCycleLabel': () => import('./components/lifeCycleLabel.vue'),//生命周期
    'customerValueLabel': () => import('./components/customerValueLabel.vue'),//生命周期
    'timeCourse': () => import('./components/timeCourse.vue'),//时间进程标签
  },
  data() {
    return {
      active:0,
      tablist: [
        {
          value: 1,
          label: '行为标签',
        },
        {
          value: 2,
          label: '生命周期标签',
        },
        {
          value: 3,
          label: '客户价值标签',
        },
        {
          value: 3,
          label: '时间进程标签',
        },
      ],
    }
  },
  created() {

  },
  mounted() {
  },
  watch: {},
  methods: {
    getActive(index) {
      this.active = index;
    },

    gotoPage() {
      this.$router.push({
        name: 'circleFriendsMgt',
        query: {
          urlActive: 0,
        }
      })
    },
    handleCloseDialog() {
      this.$emit('update:visableIf', false);
      this.$emit('handleQuery');
    }
  }
}
</script>

<style scoped lang="scss">
.other-option {
  height: 30px;
  display: flex;
  align-items: center;
  color: #2d8cf0;
  font-size: 14px;
  margin-left: 15px;
  border-top: 1px solid #eee;
}

.tips {
  display: block;
  background: #fed;
  border-radius: 2px;
  border: 1px solid #ffdbb6;
  font-size: 12px;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  width: 1000px;
  margin: 20px auto;
  font-size: 14px;
}

.content-big {
  height: calc(100vh - 150px);
  overflow-y: auto;
  width: 1000px;
  margin: auto;
  overflow-x: hidden;
}

.content-main {
  background: #fff;
  padding-bottom: 12px;
  margin-bottom: 12px;

  .content-title {
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding: 14px 20px;
    margin-bottom: 20px;
  }

  .el-form {
    padding: 0px 40px;

  }

}

.header-top {
  height: 46px;
  background: #fff;
  border-bottom: 1px solid #e9e9e9;
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
  .head-title {
    font-size: 14px;
    line-height: 22px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    .backIcon {
      display: flex;
      align-items: center;
      padding: 0;
      margin-right: 12px;
      border: none;
      width: 24px;
      height: 24px;
      background: #4b5a95;
      border-radius: 12px;
      cursor: pointer;
      justify-content: center;
    }
    i {
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      color: #fff;
    }
  }

}
.automaticLabelingMgt {
  position: relative;
  padding-bottom: 50px;
}
.table-list {
  font-size: 14px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  background: #fff;
  padding: 0px 20px;
  border-bottom: 1px solid #eee;

  li {
    cursor: pointer;
    font-weight: 400;
    list-style: none;
    margin: 0px 10px;
    position: relative;
    display: flex;
    height: 44px;
    align-items: center;

    &.active {
      color: #3070ff;

      &:after {
        content: '';
        position: absolute;
        height: 2px;
        background: #3070ff;
        width: 100%;
        bottom: 0px;
        left: 0px;
      }
    }
  }

  .example-modal {
    position: fixed;
    left: 0;
    margin-top: 10px;
    display: none;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    background: #FFFFFF;

    .example-cover {
      height: 600px;
    }
  }
}
</style>
